Skip to content

fix: add missing await for isDynamicFramework check #4955

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 19, 2019

Conversation

rosen-vladimirov
Copy link
Contributor

There's a missing await in the check if an iOS Framework is dynamic. Linter rule (no-floating-promises) does not catch it, as it is not a pure call, i.e. linter will fail in case the code is:

this.isDynamicFramework(frameworkPath);

But it will not fail in case the method is called inside if statement (as it is in our code) or when you assing the value to a variable and do not await it anywhere:

const isDynamic = this.isDynamicFramework(frameworkPath);

PR Checklist

What is the current behavior?

What is the new behavior?

Related to: #4906

There's a missing await in the check if an iOS Framework is dynamic. Linter rule (no-floating-promises) does not catch it, as it is not a pure call, i.e. linter will fail in case the code is:

```
this.isDynamicFramework(frameworkPath);
```

But it will not fail in case the method is called inside if statement (as it is in our code) or when you assing the value to a variable and do not await it anywhere:
```
const isDynamic = this.isDynamicFramework(frameworkPath);
```
@rosen-vladimirov
Copy link
Contributor Author

test cli-smoke

1 similar comment
@rosen-vladimirov
Copy link
Contributor Author

test cli-smoke

The current check if `.framework` files are dynamically linked frameworks is not working as we pass only the framework name. This breaks all projects as tns-core-modules-widgets have `.framework`, CLI decides it is not dynamically linked and the application cannot run on device. Fix the check to pass the full path to the framework.
@rosen-vladimirov
Copy link
Contributor Author

test cli-smoke

@rosen-vladimirov rosen-vladimirov merged commit 784cf72 into master Aug 19, 2019
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/add-missing-await branch August 19, 2019 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants